Two-stage multi-objective optimization for ICU bed allocation under multiple sources of uncertainty

Due to the impact of COVID-19, a significant influx of emergency patients inundated the intensive care unit (ICU), and as a result, the treatment of elective patients was postponed or even cancelled. This paper studies ICU bed allocation for three categories of patients (emergency, elective, and current ICU patients). A two-stage model and an improved Non-dominated Sorting Genetic Algorithm II (NSGA-II) are used to obtain ICU bed allocation. In the first stage, bed allocation is examined under uncertainties regarding the number of emergency patients and their length of stay (LOS). In the second stage, in addition to including the emergency patients with uncertainties in the first stage, it also considers uncertainty in the LOS of elective and current ICU patients. The two-stage model aims to minimize the number of required ICU beds and maximize resource utilization while ensuring the admission of the maximum number of patients. To evaluate the effectiveness of the model and algorithm, the improved NSGA-II was compared with two other methods: multi-objective simulated annealing (MOSA) and multi-objective Tabu search (MOTS). Drawing on data from real cases at a hospital in Lyon, France, the NSGA-II, while catering to patient requirements, saves 9.8% and 5.1% of ICU beds compared to MOSA and MOTS. In five different scenarios, comparing these two algorithms, NSGA-II achieved average improvements of 0%, 49%, 11.4%, 9.5%, and 17.1% across the five objectives.


Allocation model of the first stage
In the first stage, there are three primary optimization objectives.The first aims to maximize the bed occupancy rate, the second seeks to minimize the delay index for elective patients, and the third emphasizes maximizing the admission rate for emergency patients.The parameters, variables, and mathematical formulas for the first stage are described below: Indices and sets: T : Set of planning horizon indexed by t, el : Set of elective patients indexed by i, N : Set of current ICU patients indexed by n, Parameter: Q : Number of available ICU beds in hospital, Exp i : Expected admission date of elective patient i, LOSel i : LOS of elective patient i, Loss i : Loss of chance if postponed for elective patient i, Rem n : Remaining LOS of current ICU patient n, Mp t : Maximum number of emergency patients on the day t, t : Parameter of Poisson distribution on the day t, Variables: em t : Number of emergency patients arriving on the day t , indexed by j.Cu t : All ICU inpatients on the day t, LOSem jt : LOS of the emergency patient j on the day t, Decision variables: Mathematical model: 1, Elective patient i is admitted on the day t 0, otherwise Equations (1-3) define the three optimization objectives of the first stage.Equation (4) represents the patients who are still occupying the beds on the day t .Equation (5) calculates the total number of patients in the ICU on the day t .Equation (6) indicates that the number of elective patients and current ICU patients does not exceed Q .Because the number of emergency patients is uncertain, the total number of three types of patients may exceed Q .Equation (7) indicates that elective patients will only be served once.Equation (8) supposes that emergency patients follow Poisson distribution 29,30 .Equation (9) indicates that the number of emergency patients admitted does not exceed the maximum number in the Poisson distribution.Equations (10)(11)(12) represent the range of variables, the number of emergency patients, the number of inpatients and the LOS of patients are integers.

Allocation model of the second stage
In the second stage, further sources of uncertainty, particularly the LOS for elective and current ICU patients, are taken into account.This variation in LOS can arise as some patients might necessitate a prolonged stay due to disease progression or clinical complications.This stage emphasizes two objectives.Firstly, it seeks to minimize deviations from the initial bed arrangement established in the first stage, ensuring stability and consistency in ICU bed allocation.Secondly, the aim is to reduce the number of additional beds needed while guaranteeing accommodation for all patients.The parameters, variables, and mathematical formulas for this stage are detailed below: Variables: R i : The random number that the elective patient i extends LOS, R n : The random number that the current ICU patient n extends LOS, em t : Number of emergency patients arriving on day t , indexed by j, Cu t : All ICU inpatients on the day t, LOSem jt : LOS of the emergency patient j on the day t, NLOSel i : LOS of elective patient i in the second stage, NRem n : Remaining LOS of current ICU patient n in the second stage, S 1 = {Bedarr 11 , ..., Bedarr 1T } : Bed allocation for three categories of patients during T Days in the first stage, Q 1 = {q 11 , ..., q 1T } : The required number of ICU beds every day to meet the needs of three categories of patients in the first stage, S 2 = {Bedarr 21 , ..., Bedarr 2T } : Bed allocation for three categories of patients during T Days in the second stage, Q 2 = {q 21 , ..., q 2T } : The required number of ICU beds every day to meet the needs of three categories of patients in the first stage.
Mathematical model: www.nature.com/scientificreports/Equations (13-14) delineate the two optimization objectives for the second stage.Specifically, Eq. ( 13) maximizes the congruence between the daily bed arrangements across two stages.A high degree of similarity implies that even with changes in a patient's LOS, the bed arrangement remains largely consistent, bolstering the stability of hospital scheduling.Equation (14) aims to minimize the need for additional ICU beds when patients extend their LOS.Equations (15)(16)(17) ensure that the new solution maintains the objectives set in the first stage.Equations (18)(19)(20)(21)(22)(23) echo the constraints from the first stage.Equations (24)(25)(26)(27) indicate scenarios where patients in the second stage extend their LOS, with the resultant extended LOS being rounded up to the nearest integer.Lastly, Eqs.(28)(29)(30)(31)(32)(33) represent the range of variables, the number of patients and the extended LOS of patients are integers.

Data features of patients
The data features of the three types of patients are different.The following is an introduction to the features of these patients.

The features of emergency patients
The number of emergency patients per day is uncertain.The Poisson distribution, which describes the number of random events in a given unit of time (or space) as detailed by Nygren et al. 31 , can be utilized to represent this variability.Accordingly, the Poisson distribution is employed to formulate the probability distribution of emergency patient arrivals, as denoted in Eq. (34), where P(X = k) represents the probability when the number of emergency patients is k , and is the parameter of the Poisson distribution.The data features of emergency patients include the number of emergency patients and corresponding probability and random LOS, as shown in Fig. 1.For example, on day 1, the probability of 1 emergency patient is 5%, and the LOS is 1.The probability of 2 emergency patients is 13%, and their LOS is 1 and 3, respectively. (21

The features of elective patients
The data features of elective patients include the ID number, expected admission date, LOS, and "Loss of Chance if Postponed".The latter refers to the potential detriment due to the real admission date being later than initially expected.A few literatures address this parameter 32,33 .In our research, the "Loss of Chance if Postponed" is categorized as mild (0.1), moderate (0.5), or severe (0.9).A value of 0.9 suggests that a delay in the patient's admission would result in significant repercussions, thus warranting prioritization of the patient's request.Conversely, a value of 0.1 suggests that postponement might be reasonable in the face of ICU bed shortages."Delay index" is used to measure the total loss caused by delay, which is equal to "delay days" × "Loss of chance if postponed".As shown in Fig. 2, elective patient 1 expects to be admitted to ICU on day 1, but his admission is accepted on day 3, so his delay index is (3-1) × 0.5.

The features of current ICU patients
The data features of current ICU patients include the ID number of patients, LOS and remaining LOS, as shown in Fig. 3, for example, the LOS of current ICU patient 1 is 2, and his remaining LOS on day 1 is 1.

The process of NSGA-II
This paper mainly uses NSGA-II to solve this multi-objective problem with uncertainty.The framework of NSGA-II is shown in Fig. 4. The main steps are described in the following subsections.

The individual generation
An individual consists of bed assignments for all days, and the bed assignments for each day are generated by three steps: (1) Generate bed occupation of current ICU patients; (2) Generate uncertain numbers of emergency patients; (3) Select elective patients.The combined total of patients should not exceed the available number of beds.For clarity, different coding prefixes are used: current ICU patients have a prefix of 10,000−, emergency patients have 20,000−, and elective patients have 1−.This coding system is illustrated in Fig. 5 Initial population generation The initial population consists of a set of individuals, as shown in Fig. 6.

Crossover and mutation
Given that bed assignments for current ICU and emergency patients must be prioritized, crossover and mutation operations are only applied to elective patients.Due to the varying LOS for elective patients, bed constraints during their LOS must be observed during gene exchange operations.
For the crossover operation, two elective patients are randomly selected and their admission dates are exchanged.This operation ensures adherence to bed constraints and considers the expected admission date, as illustrated in Fig. 7.For the mutation operation, an elective patient is randomly chosen, their admission record ( 34) www.nature.com/scientificreports/ is deleted, and then another patient, whose LOS is not longer than the original patient's, is inserted.This process is depicted in Fig. 8.

Re-insert procedure
Due to variations in patients' LOS, there may be vacant ICU beds following the crossover and mutation operations.To enhance bed utilization, patients with shorter LOS and a larger loss of chance are reintroduced.This procedure is termed the "Re-Insertion Process", depicted in Fig. 9.

NSGA-II for the first stage
The procedure of NSGA-II solving the first stage model is shown in Algorithm 1.

NSGA-II for the second stage
When the LOS for certain patients is extended, limited ICU beds might result in some patients not being admitted on the day originally scheduled in the first stage.Consequently, an extended LOS requires validation to ensure that the optimal solutions from the first stage still meet bed constraints.If affirmed, the algorithm outputs the optimal solutions.If not, three alternative strategies are employed to achieve a new optimal solution.The procedure of NSGA-II for solving the second stage model is detailed in Algorithm

Case study
To evaluate the performance of the models and algorithms, we examined real-world cases from a hospital in Lyon, France.This hospital has a total of 24 ICU beds, with a planning horizon spanning one week.We simplified and privately treated the raw data.During the period, there were up to 80 elective patients and 3 current ICU patients.The daily number of emergency patients follows a Poisson distribution 34 .The parameter , according to the property of Poisson distribution, can be estimated by the average number of emergency patients over a period.These data are presented in Table 2. Additionally, the parameters for NSGA-II, derived from experimental tests, are detailed in Table 3.

Result analysis of the first stage
In the first stage, the bed requirements for current ICU patients are addressed initially, followed by emergency patients, and finally elective patients.www.nature.com/scientificreports/arrive, the emergency admission rate for that day stands at 3/12, or 25%.The three objectives are then averaged over the planning horizon.Figure 10 depicts the bed allocation for solution 1 from Table 3.For instance, ICU bed 16 (B16) is occupied by elective patient 4 on day 1, then by elective patient 18 from days 2 to 4, and subsequently by elective patient 41 from days 5 to 7. Owing to the high emergency admission rate, a majority of the beds are taken up by emergency patients.Conversely, Fig. 11 displays solution 2 from Table 3.Here, the emergency admission rate is low, leading to most of the beds being occupied by elective patients.
Figure 12 displays the probability curve of bed occupancy for the first two solutions listed in Table 3.Given the number of emergency patients is uncertain, the bed occupancy is also uncertain.For instance, on day 1, there are 3 current ICU patients and 8 elective patients.Based on the Poisson distribution, there's a 3% probability that 1 emergency patient will arrive, and then the probability of occupying 12 beds is 3%.If the probability of 2 emergency patients arriving is 5%, then the probability of occupying 13 beds stands at 5%, and so on.The Poisson 0.9

Result analysis of the second stage
Some patients may extend LOS due to changes in their condition.In the second stage, we aim to extend patients' LOS based on a probability distribution, derived from historical patient records, as shown in Table 5.Subsequently, we check whether the optimized solution in the first stage still satisfies the bed constraints.Three strategies have been designed to find robust solutions.
Three strategies in the second stage a.Elective patient-first strategy: The needs of elective patients are prioritized over those of emergency patients.Due to this prioritization, some new emergency patients arriving later may be rejected.b.Emergency patient-first strategy: The needs of emergency patients are addressed first, followed by those of elective patients.Consequently, some elective patients might not receive admission.c.Recall algorithm to generate a new solution: Based on the patients' extended LOS, the NSGA-II is recalled.
This algorithm pursues two objectives: maximizing the similarity between the new and the first-stage solutions, and minimizing the number of added beds.It also ensures that the three objectives of the first stage do not deteriorate.
Figure 13 shows the new bed arrangement for solution 1 from Table 3 when the LOS is extended under the Elective patient-first strategy.The bed arrangements of these two solutions have an 86% similarity.www.nature.com/scientificreports/ Figure 14 compares the bed occupancy of solution 1 with its three new solutions derived from the three strategies.Given that the LOS for patients is extended, additional beds are necessary to accommodate the patients' needs, leading the three new solutions to have a greater number of beds than solution 1.
"Elective patient-first strategy" adds the greatest number of beds, because the demands of emergency patients are not fully met and the number of new emergency patients is also uncertain.In contrast, "Recall algorithm" added the fewest beds, demonstrating its effective performance even in the second stage.

Results analysis of the second stage
Table 6 displays the Pareto first-front solutions from the first stage and their three corresponding solutions from the second stage.It primarily includes the numbers of admitted emergency and elective patients, as well as the   www.nature.com/scientificreports/two objectives of the second stage: similarity and added beds.Given that the demands of current ICU patients must be met, the number of these patients remains consistent across all solutions.
Figure 15 shows the average value of the 12 solutions about the number of admitted patients, the total ICU beds and the similarity between the original solution and the new one under the three strategies.
In Fig. 15, the three strategies require 41, 38, and 33 ICU beds, respectively, to accommodate the extended LOS of various patients and the uncertain number of emergency patients.The "Elective patient-first strategy" has a high similarity, but it requires a greater number of added beds and will reject some emergency patients.The "Emergency patient-first strategy" exhibits smaller similarities and a moderate number of added beds but may postpone more elective patients.Meanwhile, the "Recall algorithm strategy" demonstrates the least similarity and the fewest added beds, yet it offers the best admission rates for both elective and emergency patients.

Comparisons based on algorithms
Bed allocation performance is also influenced by the efficacy of the multi-objective algorithm.In our study, we compared NSGA-II with two other algorithms: multi-objective simulated annealing (MOSA) and multi-objective Tabu search (MOTS).To ensure a fair comparison, all three algorithms used same coding methods and optimization objectives.Additionally, domain operations in MOSA and MOTS are consistent with the crossover and mutation operations of NSGA-II.
Simulated Annealing (SA) occasionally accepts solutions that are inferior to the current one based on a certain probability.This feature can help the algorithm escape local optima and potentially find a global optimum 35,36 .The pseudocode for MOSA is detailed in Algorithm 3.
Tabu Search (TS) is a step-by-step optimization algorithm that conducts a global neighborhood search.It emulates human memory by marking previously identified local optimal solutions and processes during the  www.nature.com/scientificreports/search.By doing so, it avoids revisiting them in subsequent searches 37,38 .The pseudocode for MOTS is detailed in Algorithm 4. The parameters of MOSA and MOTS algorithms are set according to the literatures 39,40 , as shown in Table 7.

Result analysis
NSGA-II, MOSA, and MOTS are implemented in Matlab R2014a on Windows 10 (X64).The best result is chosen from 10 runs. Figure 16 displays the average number of the three patient types across all solutions using the three algorithms.Due to some patients extending their LOS in the second stage, the number of admitted patients in this stage is fewer than in the first stage.NSGA-II outperforms both MOSA and MOTS, resulting in more patients being admitted to the ICU.Table 8 presents the three optimization objectives from the first stage and the two optimization objectives from the second stage for the MOSA and MOTS algorithms.In the second stage, the averages for "Similarity" and "Added bed" are computed across the three strategies.The "Added beds" are 13.35, 16.93, and 14.78, indicating that, on average, NSGA-II, MOSA, and MOTS require 37, 41, and 39 beds respectively to satisfy patient demands.
Figure 17 shows the boxplots of the four optimization objectives except f 11 for the three algorithms.The median of MOSA and MOTS is different from the median of NSGA-II, and NSGA-II can explore more possibilities and better solutions.The average running time of the three algorithms is 41.42 s, 24.65 s, and 32.74 s, respectively.NSGA-II has the best results and the longest run time, but this time is acceptable.

Statistical analysis
In addition, a paired t-test was conducted to determine whether there are any statistically significant differences between NSGA-II and the two other algorithms: MOSA and MOTS.Given the expectation that the solution  www.nature.com/scientificreports/quality of NSGA-II is superior to that of the other two algorithms, a one-sided alternative hypothesis H1 was formulated as follows, where µ NSGA-II and µ OA are the population means for NSGA-II and OA (representing the compared algorithms: MOSA and MOTS).The results of the paired t-test are listed in Table 9.
As shown in Table 9, for all three pairs, P was less than 0.1, and the mean difference is less than 0, which indicates that NSGA-II is significantly different from other algorithms and performs better.

Comparisons based on scenarios
Scenario design Probabilistic distributions of extending LOS have some implications for bed allocation in the second stage.
Table 10 shows the probability distribution of extending LOS through 5 representative scenarios.For example, S1 represents the situation in which "Extend LOS = 0 day" accounts for the largest proportion, and S2 represents the situation in which "Extend LOS = 1 day" accounts for the largest proportion, etc.The last row in Table 10 is the probability distribution curve of the scenarios with five trends respectively.

Result analysis
Figure 18 shows the total number of admitted patients of the three algorithms under the 5 scenarios.Compared with MOSA and MOTS, the changes of NSGA-II are gentler, indicating that NSGA-II is fit to generate robust  Table 11 shows the results of the five optimization objectives in the two stages using the three algorithms under the 5 scenarios, and Fig. 19 shows the similarity and added beds for the three algorithms.In scenario 5, where most patients extend their LOS, there's a significant shift in bed allocation, leading to a lower similarity and a greater need for additional beds.Conversely, in scenario 1, with fewer patients extending their LOS, bed allocation changes minimally, resulting in higher similarity and fewer additional beds.The "added beds" of NSGA-II are 13.35, 15.67, 19.67, 20.93, and 21.07, respectively, indicating that in 5 scenarios, to meet the demands of patients, 37, 40, 44, 45, 45 ICU beds are required respectively.
Figure 20 shows the average bed occupation using three algorithms in the first stage and the 5 scenarios in the second stage.The bed occupation curve of NSGA-II lies to the left of the curve for MOSA and MOTS, indicating that NSGA-II requires fewer ICU beds compared to MOSA and MOTS.

Conclusion
This paper studies ICU bed arrangement when the number of emergency patients is uncertain and the LOS of three types of patients is also uncertain.The research is conducted in two primary stages.The first stage considers how to balance reducing elective patient waiting time while increasing emergency admission rate and bed utilization.Based on the first stage, the second stage considers how to minimize the number of added beds while ensuring the least changes in bed arrangements when patients extend their LOS.

max f 11
(t − Exp i ) × x it /

Figure 1 .
Figure 1.Data features of emergency patients.

Figure 5 .Figure 6 .
Figure 5.The coding method of the individuals.

Figure 14 .
Figure 14.Bed occupancy of solution 1 and its three corresponding solutions.

Figure 15 .
Figure 15.The number of patients and total beds and the similarity.

Algorithm 4 .Figure 16 .
Figure 16.The average number of patients in all solutions of the three algorithms.

Figure 17 .
Figure 17.The boxplots of the four optimization objectives.

Figure 18 .Figure 19 .
Figure 18.The number of admitted patients of the three algorithms under 5 scenarios.

Figure 20 .
Figure 20.The average bed occupation of the three algorithms.

Table 1 .
Literature review related to the allocation of medical resources.
Table 4presents the first-front solutions ordered by Pareto optimality.Columns 1, 2, and 3 display the numbers of the three types of patients admitted in these solutions.The 4th column represents the first objective: the bed occupancy rate.The 5th column details the second objective: the delay index.The 6th column highlights the third objective: the emergency admission rate.For instance, if the Poisson distribution predicts a maximum of 12 emergency patients on day 1, and only 3 emergency patients Figure 8. Mutation process of individuals.Vol.:(0123456789) Scientific Reports | (2023) 13:18925 | https://doi.org/10.1038/s41598-023-45777-x Under normal situation, hospitals might opt for solution 2, allocating more beds to elective patients while reserving an adequate number for emergencies.The bed occupancy remains stable from days 1-7, with the highest probability centering around occupying 28 beds.However, in critical situations, such as during the COVID-19 outbreak, hospitals could prioritize solution 1 to ensure enough beds are available for emergency patients.The Algorithm 1. NSGA-II for the first stage.

Table 2 .
The data features of three types of patients.

Table 3 .
The settings of algorithm parameters.

Table 4 .
The Pareto first-front solutions of the first stage.

Table 6 .
The solutions and their corresponding three solutions.Two objectives of the second stage values are in bold.

Table 8 .
The optimization objectives in the two stages of MOSA and MOTS.

Table 9 .
Results of paired t-test.

Table 10 .
The probability distributions under 5 scenarios.

Table 11 .
Five objectives of the three algorithms under 5 scenarios.